<template>
	<view class="container">
		<view class="blue_bg" />
		<view class="coupon_tab">
			<view v-for="(item,index) in 'data'" :key="index" :class=" { 'coupon_item':true,
			'coupon_over': active === 0, 'coupon_item coupon_overdue': active === -1 } ">
				<view class="item_up">
					<view class="left">
						仅限于XX加油站使用
						<text>满200元可用</text>
					</view>
					<view class="right">
						￥<text :class=" { 'del':active === -1 } ">20</text>
					</view>
				</view>
				<view class="item_down">
					<view class="left">
						有效期至:2020.04.23—2023.09.12
					</view>
					<view class="right">
						去使用>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active: 1,
			}
		},
		methods: {
			onActive(e) {
				this.active = e;
			},
		}
	}
</script>

<style>
	@import '@/static/images/ryx/all.css';

	.coupon_til {
		width: 100vw;
		box-sizing: border-box;
		padding: 20rpx 40rpx;
		font-size: 40rpx;
		color: #fff;
		background-color: #2679f5;
		display: flex;
		flex-flow: row nowrap;
		justify-content: space-between;
	}

	.active {
		border-bottom: #fff solid 2px;
	}

	.coupon_tab {
		width: 90vw;
		padding: 20rpx;
		margin-top: 30rpx;
		border-radius: 20rpx;
		background-color: #fff;
	}

	.coupon_item {
		height: 19vh;
		box-sizing: border-box;
		padding: 0 26rpx;
		margin: 20rpx;
		background-image: url('@/static/images/ryx/asset/bg_@2x.png');
		background-repeat: no-repeat;
		background-size: 100%;
		display: flex;
		flex-flow: column;
		color: #fff;
	}

	.coupon_over {
		background-image: none;
		background-color: #ffbb99;
	}

	.coupon_overdue {
		background-image: none;
		background-color: #bfbfbf;
	}

	.coupon_item .item_up {
		height: 80%;
		display: flex;
		flex-flow: row nowrap;
		justify-content: space-between;
		align-items: center;
	}

	.coupon_item .item_up .left {
		display: flex;
		flex-flow: column;
	}

	.coupon_item .item_up .left text {
		font-size: 40rpx;
		font-weight: bold;
	}

	.coupon_item .item_up .right text {
		font-size: 80rpx;
		font-weight: bold;
	}

	.coupon_item .item_down {
		height: 40%;
		border-top: #fff dashed 1rpx;
		display: flex;
		flex-flow: row nowrap;
		justify-content: space-between;
		align-items: center;
	}
</style>